package com.wujunshen.designpattern.creational.factory.simplefactory.simple;

import java.util.Objects;

import static com.wujunshen.designpattern.creational.factory.Constants.BRAND_ONE;
import static com.wujunshen.designpattern.creational.factory.Constants.BRAND_TWO;

/**
 * @author frank woo(吴峻申) <br>
 *     email:<a href="mailto:frank_wjs@hotmail.com">frank_wjs@hotmail.com</a> <br>
 * @date 2021/2/16 23:56<br>
 */
public class Client {
  public static void main(String[] args) {
    // 传入工厂Factory类的参数BRAND_ONE
    Objects.requireNonNull(SimpleFactory.createProduct(BRAND_ONE)).doSomething();

    // 传入工厂Factory类的参数BRAND_TWO
    Objects.requireNonNull(SimpleFactory.createProduct(BRAND_TWO)).doSomething();
  }
}
